import { createStore } from "vuex"

const modulesFiles = import.meta.glob("./modules/*js", { eager: true })
const modules = {}
for (const key in modulesFiles) {
  modules[key.replace(/(\.\/modules\/|\.js)/g, "")] = modulesFiles[key].default
}

const store = createStore({
  modules
})

export default store
